package org.abacus.platform.action.ask;

import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.Proxy;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLConnection;

public final class Ask {
	final URL url;

	public Ask(String url) throws MalformedURLException {
		super();
		this.url = new URL(url);
	}

	public final URLConnection openConnection(Proxy proxy) throws IOException {
		return this.url.openConnection(proxy);
	}

	public final URLConnection openConnection() throws IOException {
		return this.url.openConnection();
	}

	public final InputStream openStream() throws IOException {
		return this.url.openStream();
	}

	public final String getAuthority() {
		return this.url.getAuthority();
	}

	public final Object getContent() throws IOException {
		return this.url.getContent();
	}

	public final Object getContent(Class<?>[] classes) throws IOException {
		return this.url.getContent(classes);
	}

	public final int getDefaultPort() {
		return this.url.getDefaultPort();
	}

	public final String getFile() {
		return this.url.getFile();
	}

	public final String getHost() {
		return this.url.getHost();
	}

	public final String getPath() {
		return this.url.getPath();
	}

	public final int getPort() {
		return this.url.getPort();
	}

	public final String getProtocol() {
		return this.url.getProtocol();
	}

	public final String getQuery() {
		return this.url.getQuery();
	}

	public final String getRef() {
		return this.url.getRef();
	}

	public final String getUserInfo() {
		return this.url.getUserInfo();
	}

	public final boolean sameFile(URL other) {
		return this.url.sameFile(other);
	}

	public final String toExternalForm() {
		return this.url.toExternalForm();
	}

	public final String toString() {
		return this.url.toString();
	}

	public final URI toURI() throws URISyntaxException {
		return this.url.toURI();
	}
}
